package diffteleop_base;


import april.util.TimeUtil;
import arlpanda.lcmtypes.waypointlist_t;
import lcm.lcm.LCM;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author team10
 */
public class WaypointSend {

    //Members
    private final LCM lcm;

    public WaypointSend(LCM lcm) {
        this.lcm = lcm;
    }

    public void sendWaypoints() {
        System.out.println("sending!");

        waypointlist_t cmd = new waypointlist_t();
        cmd.number = 4;
        cmd.x = new float[cmd.number];
        cmd.y = new float[cmd.number];
        cmd.x[0] = 0;
        cmd.x[1] = 1;
        cmd.x[2] = 2;
        cmd.x[3] = 3;
        cmd.y[0] = 0;
        cmd.y[1] = 1;
        cmd.y[2] = 2;
        cmd.y[3] = 3;
        cmd.utime = TimeUtil.utime();
        this.lcm.publish("Team10_WAYPOINTS", cmd);
    }
}
